<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('解决投诉')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-complain-edit" th:object="${complainInfo}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="form-group">    
                <label class="col-sm-3 control-label">投诉人编号：</label>
                <div class="col-sm-8">
                    <input name="complainResidentNo" th:field="*{complainResidentNo}" class="form-control" type="text" disabled>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">投诉类型：</label>
                <div class="col-sm-8">
                    <select name="complainType" class="form-control m-b" th:with="type=${@dict.getType('complain_type')}" disabled>
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{complainType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">投诉状态：</label>
                <div class="col-sm-8">
                    <select name="complainStatus" class="form-control m-b" th:with="type=${@dict.getType('complain_status')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{complainStatus}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">投诉时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="complainTime" th:value="${#dates.format(complainInfo.complainTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" disabled>
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">投诉原因：</label>
                <div class="col-sm-8">
                    <textarea name="complainReason" class="form-control">[[*{complainReason}]]</textarea>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">投诉解决时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input name="complainSolveTime" th:value="${#dates.format(complainInfo.complainSolveTime, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">解决类型：</label>
                <div class="col-sm-8">
                    <select name="complainSolveType" class="form-control m-b" th:with="type=${@dict.getType('complain_solve_type')}">
                        <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{complainSolveType}"></option>
                    </select>
                </div>
            </div>
            <div class="form-group">    
                <label class="col-sm-3 control-label">解决结果：</label>
                <div class="col-sm-8">
                    <input name="complainSolveResult" th:field="*{complainSolveResult}" class="form-control" type="text">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label">投诉小区：</label>
                <div class="col-sm-8">
                    <select name="courtId" class="form-control m-b" disabled>
                        <option th:each="court : ${courtList}" th:text="${court.courtName}" th:value="${court.id}" th:field="*{courtId}"></option>
                    </select>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "property/complain";
        $("#form-complain-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-complain-edit').serialize());
            }
        }

        $("input[name='complainTime']").datetimepicker({
            format: "yyyy-mm-dd hh:ii:ss",
            minView: "month",
            autoclose: true
        });

        $("input[name='complainSolveTime']").datetimepicker({
            format: "yyyy-mm-dd hh:ii:ss",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>